package com.freshcity.upload.ui
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.TextEvent;
	import flash.external.ExternalInterface;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	import flash.text.TextFormat;
	
	public class TipB extends Sprite
	{
		public function TipB()
		{
			var titFormat:TextFormat;
			var descFormat:TextFormat;
			
			var loc1:*;
			super();
			this._bg = new SK_TipB();
			this._bg.mouseEnabled = false;
			titFormat = new TextFormat("宋体", 14, 3355443, true);
			this._tit = new TextField();
			this._tit.blendMode = flash.display.BlendMode.LAYER;
			with (this._tit) 
			{
				selectable = false;
				autoSize = TextFieldAutoSize.LEFT;
				x = 70;
				y = 80;
				defaultTextFormat = titFormat;
				text = "没有检测到摄像头";
			}
			descFormat = new TextFormat("宋体", 12, 6710886);
			descFormat.leading = 10;
			this._desc = new TextField();
			this._desc.width = 224;
			this._desc.height = 180;
			this._desc.x = 70;
			this._desc.y = 110;
			this._desc.blendMode = flash.display.BlendMode.LAYER;
			this._desc.selectable = false;
			this._desc.mouseWheelEnabled = false;
			this._desc.multiline = true;
			this._desc.wordWrap = true;
			this._desc.defaultTextFormat = descFormat;
			this._desc.htmlText = "1.检查电脑是否连接摄像头。\n2.检查摄像头是否被其他程序占用。\n3.检查是否拒绝了FlashPlayer的访问：鼠标右键->设置->允许。";
			this._desc.addEventListener(flash.events.TextEvent.LINK, this.linkHandler);
			addChildAt(this._bg, 0);
			addChildAt(this._tit, 1);
			addChildAt(this._desc, 2);
			this.blendMode = flash.display.BlendMode.LAYER;
			return;
		}
		
		private function linkHandler(arg1:TextEvent):void
		{
			if (ExternalInterface.available) 
			{
				ExternalInterface.call("window.location.reload(true)");
			}
			return;
		}
		
		private var _bg:Sprite;
		
		private var _tit:TextField;
		
		private var _desc:TextField;
	}
}